-- GENERATED SPELL FOR [Chromatic Elite Guard] --


function spell0_10814(pUnit, Event) --@Knockdown,n/a--
pUnit:FullCastSpellOnTarget(16790,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10814', 2000, 1)
end

function spell1_10814(pUnit, Event) --@Mortal Strike,n/a--
pUnit:FullCastSpellOnTarget(15708,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10814', 5299, 1)
end

function spell2_10814(pUnit, Event) --@Strike,n/a--
pUnit:FullCastSpellOnTarget(15580,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10814', 534, 1)
end

function Sorts_10814(pUnit, Event)
local choix_sorts_10814 = math.random(0, 2)
if choix_sorts_10814 == 0 then
pUnit:RegisterEvent('spell0_10814', 1, 1)
end
if choix_sorts_10814 == 1 then
pUnit:RegisterEvent('spell1_10814', 1, 1)
end
if choix_sorts_10814 == 2 then
pUnit:RegisterEvent('spell2_10814', 1, 1)
end
end

function mob10814_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_10814', math.random(1500, 3000), 1)
end

function mob10814_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10814_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10814_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(10814, 1, 'mob10814_Action')
RegisterUnitEvent(10814, 2, 'mob10814_Leave')
RegisterUnitEvent(10814, 3, 'mob10814_Kill')
RegisterUnitEvent(10814, 4, 'mob10814_Die')
